/************************************************************
* @file gkt_malloc.h
************************************************************/

#ifndef GKT_MALLOC_H
#define GKT_MALLOC_H

#include "gkt_config.h"
#include <malloc.h>

#ifdef __cplusplus
extern "C" {
#endif

#define gkt_malloc	malloc
#define gkt_calloc	calloc
#define gkt_free	free

#if defined(GKT_CONFIG_DEBUG_ENABLE) && GKT_CONFIG_DEBUG_ENABLE \
	&& defined(GKT_CONFIG_DEBUG_MALLOC_RECORD_ENABLE) && GKT_CONFIG_DEBUG_MALLOC_RECORD_ENABLE
#define GKT_MALLOC_FREE_RECORD_ENABLE	GKT_CONFIG_DEBUG_MALLOC_RECORD_ENABLE
void gkt_malloc_free_show_record(const char *location);
#else
#define GKT_MALLOC_FREE_RECORD_ENABLE	0
#define gkt_malloc_free_show_record(location_str)	do { (void) (location_str); } while(0)
#endif


#ifdef __cplusplus
}
#endif

#endif	/* GKT_MALLOC_H */


